import com.google.gson.GsonBuilder;
import com.lyf.User;


public class test {
    public static void main(String[] args) {
        User user = new User();
        user.setId(1);
        user.setName("Lisa");
        GsonBuilder gsonBuilder = new GsonBuilder();
        gsonBuilder.setPrettyPrinting();
        System.out.println(gsonBuilder.create().toJson(user));
    }
}
